package com.quizzer.system.dto.question.question;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 题目更新 DTO
 * 用于更新题目信息
 *
 * @author rong
 * @date 2025/10/7 18:18
 */
@Data
@ApiModel(description = "题目更新 DTO")
public class QuestionUpdateDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "题目ID", required = true, example = "1")
    @NotNull(message = "题目ID不能为空")
    private Long id;

    @ApiModelProperty(value = "所属小类别ID", required = true, example = "101")
    @NotNull(message = "所属小类别ID不能为空")
    private Long categoryId;

    @ApiModelProperty(value = "题目内容", required = true, example = "Java 中的 HashMap 是什么？")
    @NotBlank(message = "题目内容不能为空")
    private String questionText;

    @ApiModelProperty(value = "答案内容", required = true, example = "HashMap 是一种键值对集合")
    @NotBlank(message = "答案内容不能为空")
    private String answerText;

    @ApiModelProperty(value = "难度级别：1-简单，2-中等，3-困难", example = "2")
    private Integer difficulty;

    @ApiModelProperty(value = "排序字段，数值越小越靠前", example = "1")
    private Integer sort;
}
